OCL Pattern Matching
نویسنده
چکیده
This paper proposes an extension to OCL that addresses a concern regarding the proliferation of navigation expressions that occur when expressing predicates over objects. Declarative patterns are introduced that can be used to match against object structures so that repeated variables reduce the need for lengthy repeated navigation expressions. Patterns provide the basis for a further contribution that shows how objects can be used as functions.
منابع مشابه
On the Functional Interpretation of OCL
The Object Constraint Language (OCL) is defined as a sideeffect-free language combining model-oriented and functional features. Its interpreters are mostly focused on model-oriented features, providing a direct representation of features like inheritance and properties navigation. However, in the last few years many other functional features were proposed, e.g. pattern matching, lambda expressi...
متن کاملSafe Navigation in OCL
The null object has been useful and troublesome ever since it was introduced. The problems have been mitigated by references in C++, annotations in Java or safe navigation in Groovy, Python and Xbase. Introduction of a safe navigation operator to OCL has some rather unpleasant consequences. We examine these consequences and identify further OCL refinements that are needed to make safe navigatio...
متن کاملOn Message Specifications in OCL 1
The object constraint language (OCL) is the established language for specifying of properties of objects and object structures. Recently an extension of OCL has been proposed for the specification of messages sent between objects. In this paper we present a generalization of this extension which allows additionally to specify causality constraints. From a pragmatic point of view, such causality...
متن کاملTowards Temporal constraint Support for OCL
The Object Constraint Language (OCL) is widely used to express precise and unambiguous constraints on models and object oriented programs. However, the notion of temporal constraints, controlling the system behavior over time, has not been natively supported. Such temporal constraints are necessary to model reactive and real-time systems. Although there are works addressing temporal extensions ...
متن کاملTranslating OCL to Graph Patterns
Model-driven tools use model queries for many purposes, including validation of well-formedness rules and speci cation of derived features. The majority of declarative model query corpus available in industry appears to use the OCL language. Graph pattern based queries, however, would have a number of advantages due to their more abstract speci cation, such as performance improvements through a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2013